<script setup>
import Header from './Header.vue'
import Footer from './Footer.vue'

const props = defineProps({
  navigation: {
    type: Array,
    default: () => []
  }
})
</script>

<template>
  <!-- Outer background layer (mimics the body background) -->
  <div class="fixed inset-0 flex justify-center sm:px-8">
    <div class="flex w-full max-w-7xl lg:px-8">
      <!-- Inner content layer with white/dark background and ring -->
      <div class="w-full bg-white ring-1 ring-zinc-100 dark:bg-zinc-900 dark:ring-zinc-300/20" />
    </div>
  </div>

  <!-- Main content -->
  <div class="relative flex w-full flex-col">
    <Header :navigation="props.navigation">
      <template #actions>
        <slot name="header-actions" />
      </template>
    </Header>
    <main class="flex-1">
      <slot />
    </main>
    <Footer />
  </div>
</template>

<style scoped>
.fixed {
  position: fixed;
}
</style>
